/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package horsechess.packet;

/**
 *
 * @author Administrator
 */
public class MatchPacket {

    private String winner;
    private String loser;

    public MatchPacket(String winner, String loser) {
        this.winner = winner;
        this.loser = loser;
    }

    public MatchPacket(String msg) {
        String[] strs=msg.split("#");
        winner=strs[1];
        loser=strs[2];
    }


    

    public String getLoser() {
        return loser;
    }

    public String getWinner() {
        return winner;
    }

    public void setLoser(String loser) {
        this.loser = loser;
    }

    public void setWinner(String winner) {
        this.winner = winner;
    }

    @Override
    public String toString() {
        return "@Match#"+winner+"#"+loser;
    }



}
